<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "yl_nav".
 *
 * @property integer $nav_id
 * @property string $nav_name
 * @property integer $nav_level
 * @property string $nav_link
 */
class CwNav extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'cw_nav';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['nav_name', 'nav_level', 'nav_link','nav_dady'], 'required'],
            [['nav_level'], 'integer'],
            [['nav_name', 'nav_link','nav_dady'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'nav_id' => 'Nav ID',
            'nav_name' => '名称',
            'nav_level' => '阶级',
            'nav_link' => '超链接',
            'nav_dady' => '父类'
        ];
    }
}
